home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / POSIX.Z / POSIX
Encoding:
Text File  |  1998-10-28  |  47.6 KB  |  1,783 lines

  1.  
  2.  
  3.  
  4.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       POSIX    - Perl interface to IEEE Std 1003.1
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           use POSIX;
  13.           use POSIX    qw(setsid);
  14.           use POSIX    qw(:errno_h :fcntl_h);
  15.  
  16.           printf "EINTR is %d\n", EINTR;
  17.  
  18.           $sess_id = POSIX::setsid();
  19.  
  20.           $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY,    0644);
  21.           # note: that's a filedescriptor, *NOT* a filehandle
  22.  
  23.  
  24.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  25.       The POSIX module permits you to access all (or nearly    all)
  26.       the standard POSIX 1003.1 identifiers.  Many of these
  27.       identifiers have been    given Perl-ish interfaces.  Things
  28.       which    are #defines in    C, like    EINTR or O_NDELAY, are
  29.       automatically    exported into your namespace.  All functions
  30.       are only exported if you ask for them    explicitly.  Most
  31.       likely people    will prefer to use the fully-qualified
  32.       function names.
  33.  
  34.       This document    gives a    condensed list of the features
  35.       available in the POSIX module.  Consult your operating
  36.       system's manpages for    general    information on most features.
  37.       Consult the _p_e_r_l_f_u_n_c manpage for functions which are noted
  38.       as being identical to    Perl's builtin functions.
  39.  
  40.       The first section describes POSIX functions from the 1003.1
  41.       specification.  The second section describes some classes
  42.       for signal objects, TTY objects, and other miscellaneous
  43.       objects.  The    remaining sections list    various    constants and
  44.       macros in an organization which roughly follows IEEE Std
  45.       1003.1b-1993.
  46.  
  47.      NNNNOOOOTTTTEEEE
  48.       The POSIX module is probably the most    complex    Perl module
  49.       supplied with    the standard distribution.  It incorporates
  50.       autoloading, namespace games,    and dynamic loading of code
  51.       that's in Perl, C, or    both.  It's a great source of wisdom.
  52.  
  53.      CCCCAAAAVVVVEEEEAAAATTTTSSSS
  54.       A few    functions are not implemented because they are C
  55.       specific.  If    you attempt to call these, they    will print a
  56.       message telling you that they    aren't implemented, and
  57.       suggest using    the Perl equivalent should one exist.  For
  58.       example, trying to access the    _s_e_t_j_m_p() call will elicit the
  59.       message "_s_e_t_j_m_p() is C-specific: use eval {} instead".
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  71.  
  72.  
  73.  
  74.       Furthermore, some evil vendors will claim 1003.1 compliance,
  75.       but in fact are not so: they will not    pass the PCTS (POSIX
  76.       Compliance Test Suites).  For    example, one vendor may    not
  77.       define EDEADLK, or the semantics of the errno    values set by
  78.       _o_p_e_n(2) might    not be quite right.  Perl does not attempt to
  79.       verify POSIX compliance.  That means you can currently
  80.       successfully say "use    POSIX",     and then later    in your
  81.       program you find that    your vendor has    been lax and there's
  82.       no usable ICANON macro after all.  This could    be construed
  83.       to be    a bug.
  84.  
  85.      FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  86.       _exit      This is identical to the C function _exit().
  87.  
  88.       abort      This is identical to the C function abort().
  89.  
  90.       abs      This is identical to Perl's builtin abs() function.
  91.  
  92.       access  Determines the accessibility of a file.
  93.  
  94.               if( POSIX::access( "/", &POSIX::R_OK ) ){
  95.                   print    "have read permission\n";
  96.               }
  97.  
  98.           Returns undef    on failure.
  99.  
  100.       acos      This is identical to the C function acos().
  101.  
  102.       alarm      This is identical to Perl's builtin alarm()
  103.           function.
  104.  
  105.       asctime This is identical to the C function asctime().
  106.  
  107.       asin      This is identical to the C function asin().
  108.  
  109.       assert  Unimplemented.
  110.  
  111.       atan      This is identical to the C function atan().
  112.  
  113.       atan2      This is identical to Perl's builtin atan2()
  114.           function.
  115.  
  116.       atexit  _a_t_e_x_i_t() is C-specific: use END {} instead.
  117.  
  118.       atof      _a_t_o_f() is C-specific.
  119.  
  120.       atoi      _a_t_o_i() is C-specific.
  121.  
  122.       atol      _a_t_o_l() is C-specific.
  123.  
  124.       bsearch _b_s_e_a_r_c_h() not    supplied.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  137.  
  138.  
  139.  
  140.       calloc  _c_a_l_l_o_c() is C-specific.
  141.  
  142.       ceil      This is identical to the C function ceil().
  143.  
  144.       chdir      This is identical to Perl's builtin chdir()
  145.           function.
  146.  
  147.       chmod      This is identical to Perl's builtin chmod()
  148.           function.
  149.  
  150.       chown      This is identical to Perl's builtin chown()
  151.           function.
  152.  
  153.       clearerr
  154.           Use method IO::Handle::clearerr() instead.
  155.  
  156.       clock      This is identical to the C function clock().
  157.  
  158.       close      Close    the file.  This    uses file descriptors such as
  159.           those    obtained by calling POSIX::open.
  160.  
  161.               $fd =    POSIX::open( "foo", &POSIX::O_RDONLY );
  162.               POSIX::close(    $fd );
  163.  
  164.           Returns undef    on failure.
  165.  
  166.       closedir
  167.           This is identical to Perl's builtin closedir()
  168.           function.
  169.  
  170.       cos      This is identical to Perl's builtin cos() function.
  171.  
  172.       cosh      This is identical to the C function cosh().
  173.  
  174.       creat      Create a new file.  This returns a file descriptor
  175.           like the ones    returned by POSIX::open.  Use
  176.           POSIX::close to close    the file.
  177.  
  178.               $fd =    POSIX::creat( "foo", 0611 );
  179.               POSIX::close(    $fd );
  180.  
  181.  
  182.       ctermid Generates the    path name for the controlling
  183.           terminal.
  184.  
  185.               $path    = POSIX::ctermid();
  186.  
  187.  
  188.       ctime      This is identical to the C function ctime().
  189.  
  190.       cuserid Get the character login name of the user.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 10/23/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  203.  
  204.  
  205.  
  206.               $name    = POSIX::cuserid();
  207.  
  208.  
  209.       difftime
  210.           This is identical to the C function difftime().
  211.  
  212.       div      _d_i_v()    is C-specific.
  213.  
  214.       dup      This is similar to the C function dup().
  215.  
  216.           This uses file descriptors such as those obtained by
  217.           calling POSIX::open.
  218.  
  219.           Returns undef    on failure.
  220.  
  221.       dup2      This is similar to the C function dup2().
  222.  
  223.           This uses file descriptors such as those obtained by
  224.           calling POSIX::open.
  225.  
  226.           Returns undef    on failure.
  227.  
  228.       errno      Returns the value of errno.
  229.  
  230.               $errno = POSIX::errno();
  231.  
  232.  
  233.       execl      _e_x_e_c_l() is C-specific.
  234.  
  235.       execle  _e_x_e_c_l_e() is C-specific.
  236.  
  237.       execlp  _e_x_e_c_l_p() is C-specific.
  238.  
  239.       execv      _e_x_e_c_v() is C-specific.
  240.  
  241.       execve  _e_x_e_c_v_e() is C-specific.
  242.  
  243.       execvp  _e_x_e_c_v_p() is C-specific.
  244.  
  245.       exit      This is identical to Perl's builtin exit() function.
  246.  
  247.       exp      This is identical to Perl's builtin exp() function.
  248.  
  249.       fabs      This is identical to Perl's builtin abs() function.
  250.  
  251.       fclose  Use method IO::Handle::close() instead.
  252.  
  253.       fcntl      This is identical to Perl's builtin fcntl()
  254.           function.
  255.  
  256.       fdopen  Use method IO::Handle::new_from_fd() instead.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 10/23/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  269.  
  270.  
  271.  
  272.       feof      Use method IO::Handle::eof() instead.
  273.  
  274.       ferror  Use method IO::Handle::error() instead.
  275.  
  276.       fflush  Use method IO::Handle::flush() instead.
  277.  
  278.       fgetc      Use method IO::Handle::getc()    instead.
  279.  
  280.       fgetpos Use method IO::Seekable::getpos() instead.
  281.  
  282.       fgets      Use method IO::Handle::gets()    instead.
  283.  
  284.       fileno  Use method IO::Handle::fileno() instead.
  285.  
  286.       floor      This is identical to the C function floor().
  287.  
  288.       fmod      This is identical to the C function fmod().
  289.  
  290.       fopen      Use method IO::File::open() instead.
  291.  
  292.       fork      This is identical to Perl's builtin fork() function.
  293.  
  294.       fpathconf
  295.           Retrieves the    value of a configurable    limit on a
  296.           file or directory.  This uses    file descriptors such
  297.           as those obtained by calling POSIX::open.
  298.  
  299.           The following    will determine the maximum length of
  300.           the longest allowable    pathname on the    filesystem
  301.           which    holds /tmp/foo.
  302.  
  303.               $fd =    POSIX::open( "/tmp/foo", &POSIX::O_RDONLY );
  304.               $path_max = POSIX::fpathconf(    $fd, &POSIX::_PC_PATH_MAX );
  305.  
  306.           Returns undef    on failure.
  307.  
  308.       fprintf _f_p_r_i_n_t_f() is C-specific--use printf instead.
  309.  
  310.       fputc      _f_p_u_t_c() is C-specific--use print instead.
  311.  
  312.       fputs      _f_p_u_t_s() is C-specific--use print instead.
  313.  
  314.       fread      _f_r_e_a_d() is C-specific--use read instead.
  315.  
  316.       free      _f_r_e_e() is C-specific.
  317.  
  318.       freopen _f_r_e_o_p_e_n() is C-specific--use open instead.
  319.  
  320.       frexp      Return the mantissa and exponent of a    floating-point
  321.           number.
  322.  
  323.               ($mantissa, $exponent) = POSIX::frexp( 3.14 );
  324.  
  325.  
  326.  
  327.      Page 5                        (printed 10/23/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  335.  
  336.  
  337.  
  338.       fscanf  _f_s_c_a_n_f() is C-specific--use <> and regular
  339.           expressions instead.
  340.  
  341.       fseek      Use method IO::Seekable::seek() instead.
  342.  
  343.       fsetpos Use method IO::Seekable::setpos() instead.
  344.  
  345.       fstat      Get file status.  This uses file descriptors such as
  346.           those    obtained by calling POSIX::open.  The data
  347.           returned is identical    to the data from Perl's
  348.           builtin stat function.
  349.  
  350.               $fd =    POSIX::open( "foo", &POSIX::O_RDONLY );
  351.               @stats = POSIX::fstat( $fd );
  352.  
  353.  
  354.       ftell      Use method IO::Seekable::tell() instead.
  355.  
  356.       fwrite  _f_w_r_i_t_e() is C-specific--use print instead.
  357.  
  358.       getc      This is identical to Perl's builtin getc() function.
  359.  
  360.       getchar Returns one character    from STDIN.
  361.  
  362.       getcwd  Returns the name of the current working directory.
  363.  
  364.       getegid Returns the effective    group id.
  365.  
  366.       getenv  Returns the value of the specified enironment
  367.           variable.
  368.  
  369.       geteuid Returns the effective    user id.
  370.  
  371.       getgid  Returns the user's real group    id.
  372.  
  373.       getgrgid
  374.           This is identical to Perl's builtin getgrgid()
  375.           function.
  376.  
  377.       getgrnam
  378.           This is identical to Perl's builtin getgrnam()
  379.           function.
  380.  
  381.       getgroups
  382.           Returns the ids of the user's    supplementary groups.
  383.  
  384.       getlogin
  385.           This is identical to Perl's builtin getlogin()
  386.           function.
  387.  
  388.       getpgrp This is identical to Perl's builtin getpgrp()
  389.           function.
  390.  
  391.  
  392.  
  393.      Page 6                        (printed 10/23/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  401.  
  402.  
  403.  
  404.       getpid  Returns the process's    id.
  405.  
  406.       getppid This is identical to Perl's builtin getppid()
  407.           function.
  408.  
  409.       getpwnam
  410.           This is identical to Perl's builtin getpwnam()
  411.           function.
  412.  
  413.       getpwuid
  414.           This is identical to Perl's builtin getpwuid()
  415.           function.
  416.  
  417.       gets      Returns one line from    STDIN.
  418.  
  419.       getuid  Returns the user's id.
  420.  
  421.       gmtime  This is identical to Perl's builtin gmtime()
  422.           function.
  423.  
  424.       isalnum This is identical to the C function, except that it
  425.           can apply to a single    character or to    a whole
  426.           string.
  427.  
  428.       isalpha This is identical to the C function, except that it
  429.           can apply to a single    character or to    a whole
  430.           string.
  431.  
  432.       isatty  Returns a boolean indicating whether the specified
  433.           filehandle is    connected to a tty.
  434.  
  435.       iscntrl This is identical to the C function, except that it
  436.           can apply to a single    character or to    a whole
  437.           string.
  438.  
  439.       isdigit This is identical to the C function, except that it
  440.           can apply to a single    character or to    a whole
  441.           string.
  442.  
  443.       isgraph This is identical to the C function, except that it
  444.           can apply to a single    character or to    a whole
  445.           string.
  446.  
  447.       islower This is identical to the C function, except that it
  448.           can apply to a single    character or to    a whole
  449.           string.
  450.  
  451.       isprint This is identical to the C function, except that it
  452.           can apply to a single    character or to    a whole
  453.           string.
  454.  
  455.  
  456.  
  457.  
  458.  
  459.      Page 7                        (printed 10/23/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  467.  
  468.  
  469.  
  470.       ispunct This is identical to the C function, except that it
  471.           can apply to a single    character or to    a whole
  472.           string.
  473.  
  474.       isspace This is identical to the C function, except that it
  475.           can apply to a single    character or to    a whole
  476.           string.
  477.  
  478.       isupper This is identical to the C function, except that it
  479.           can apply to a single    character or to    a whole
  480.           string.
  481.  
  482.       isxdigit
  483.           This is identical to the C function, except that it
  484.           can apply to a single    character or to    a whole
  485.           string.
  486.  
  487.       kill      This is identical to Perl's builtin kill() function.
  488.  
  489.       labs      _l_a_b_s() is C-specific,    use abs    instead.
  490.  
  491.       ldexp      This is identical to the C function ldexp().
  492.  
  493.       ldiv      _l_d_i_v() is C-specific,    use / and int instead.
  494.  
  495.       link      This is identical to Perl's builtin link() function.
  496.  
  497.       localeconv
  498.           Get numeric formatting information.  Returns a
  499.           reference to a hash containing the current locale
  500.           formatting values.
  501.  
  502.           The database for the ddddeeee (Deutsch or German) locale.
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                        (printed 10/23/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  533.  
  534.  
  535.  
  536.               $loc = POSIX::setlocale( &POSIX::LC_ALL, "de"    );
  537.               print    "Locale    = $loc\n";
  538.               $lconv = POSIX::localeconv();
  539.               print    "decimal_point      = ", $lconv->{decimal_point},      "\n";
  540.               print    "thousands_sep      = ", $lconv->{thousands_sep},      "\n";
  541.               print    "grouping = ", $lconv->{grouping},      "\n";
  542.               print    "int_curr_symbol  = ", $lconv->{int_curr_symbol}, "\n";
  543.               print    "currency_symbol  = ", $lconv->{currency_symbol}, "\n";
  544.               print    "mon_decimal_point = ",    $lconv->{mon_decimal_point}, "\n";
  545.               print    "mon_thousands_sep = ",    $lconv->{mon_thousands_sep}, "\n";
  546.               print    "mon_grouping      = ", $lconv->{mon_grouping},      "\n";
  547.               print    "positive_sign      = ", $lconv->{positive_sign},      "\n";
  548.               print    "negative_sign      = ", $lconv->{negative_sign},      "\n";
  549.               print    "int_frac_digits  = ", $lconv->{int_frac_digits}, "\n";
  550.               print    "frac_digits      = ", $lconv->{frac_digits},      "\n";
  551.               print    "p_cs_precedes      = ", $lconv->{p_cs_precedes},      "\n";
  552.               print    "p_sep_by_space      = ", $lconv->{p_sep_by_space},  "\n";
  553.               print    "n_cs_precedes      = ", $lconv->{n_cs_precedes},      "\n";
  554.               print    "n_sep_by_space      = ", $lconv->{n_sep_by_space},  "\n";
  555.               print    "p_sign_posn      = ", $lconv->{p_sign_posn},      "\n";
  556.               print    "n_sign_posn      = ", $lconv->{n_sign_posn},      "\n";
  557.  
  558.  
  559.       localtime
  560.           This is identical to Perl's builtin localtime()
  561.           function.
  562.  
  563.       log      This is identical to Perl's builtin log() function.
  564.  
  565.       log10      This is identical to the C function log10().
  566.  
  567.       longjmp _l_o_n_g_j_m_p() is C-specific: use die instead.
  568.  
  569.       lseek      Move the file's read/write position.    This uses file
  570.           descriptors such as those obtained by    calling
  571.           POSIX::open.
  572.  
  573.               $fd =    POSIX::open( "foo", &POSIX::O_RDONLY );
  574.               $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
  575.  
  576.           Returns undef    on failure.
  577.  
  578.       malloc  _m_a_l_l_o_c() is C-specific.
  579.  
  580.       mblen      This is identical to the C function mblen().
  581.  
  582.       mbstowcs
  583.           This is identical to the C function mbstowcs().
  584.  
  585.       mbtowc  This is identical to the C function mbtowc().
  586.  
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                        (printed 10/23/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  599.  
  600.  
  601.  
  602.       memchr  _m_e_m_c_h_r() is C-specific, use _i_n_d_e_x() instead.
  603.  
  604.       memcmp  _m_e_m_c_m_p() is C-specific, use eq instead.
  605.  
  606.       memcpy  _m_e_m_c_p_y() is C-specific, use =    instead.
  607.  
  608.       memmove _m_e_m_m_o_v_e() is C-specific, use = instead.
  609.  
  610.       memset  _m_e_m_s_e_t() is C-specific, use x    instead.
  611.  
  612.       mkdir      This is identical to Perl's builtin mkdir()
  613.           function.
  614.  
  615.       mkfifo  This is similar to the C function mkfifo().
  616.  
  617.           Returns undef    on failure.
  618.  
  619.       mktime  Convert date/time info to a calendar time.
  620.  
  621.           Synopsis:
  622.  
  623.               mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
  624.  
  625.           The month (mon), weekday (wday), and yearday (yday)
  626.           begin    at zero.  I.e. January is 0, not 1; Sunday is
  627.           0, not 1; January 1st    is 0, not 1.  The year (year)
  628.           is given in years since 1900.     I.e. The year 1995 is
  629.           95; the year 2001 is 101.  Consult your system's
  630.           mktime() manpage for details about these and the
  631.           other    arguments.
  632.  
  633.           Calendar time    for December 12, 1995, at 10:30    am.
  634.  
  635.               $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
  636.               print    "Date =    ", POSIX::ctime($time_t);
  637.  
  638.           Returns undef    on failure.
  639.  
  640.       modf      Return the integral and fractional parts of a
  641.           floating-point number.
  642.  
  643.               ($fractional,    $integral) = POSIX::modf( 3.14 );
  644.  
  645.  
  646.       nice      This is similar to the C function nice().
  647.  
  648.           Returns undef    on failure.
  649.  
  650.       offsetof
  651.           _o_f_f_s_e_t_o_f() is    C-specific.
  652.  
  653.  
  654.  
  655.  
  656.  
  657.      Page 10                        (printed 10/23/98)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  665.  
  666.  
  667.  
  668.       open      Open a file for reading for writing.    This returns
  669.           file descriptors, not    Perl filehandles.  Use
  670.           POSIX::close to close    the file.
  671.  
  672.           Open a file read-only    with mode 0666.
  673.  
  674.               $fd =    POSIX::open( "foo" );
  675.  
  676.           Open a file for read and write.
  677.  
  678.               $fd =    POSIX::open( "foo", &POSIX::O_RDWR );
  679.  
  680.           Open a file for write, with truncation.
  681.  
  682.               $fd =    POSIX::open( "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC );
  683.  
  684.           Create a new file with mode 0640.  Set up the    file
  685.           for writing.
  686.  
  687.               $fd =    POSIX::open( "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY,    0640 );
  688.  
  689.           Returns undef    on failure.
  690.  
  691.       opendir Open a directory for reading.
  692.  
  693.               $dir = POSIX::opendir( "/tmp"    );
  694.               @files = POSIX::readdir( $dir    );
  695.               POSIX::closedir( $dir    );
  696.  
  697.           Returns undef    on failure.
  698.  
  699.       pathconf
  700.           Retrieves the    value of a configurable    limit on a
  701.           file or directory.
  702.  
  703.           The following    will determine the maximum length of
  704.           the longest allowable    pathname on the    filesystem
  705.           which    holds /tmp.
  706.  
  707.               $path_max = POSIX::pathconf( "/tmp", &POSIX::_PC_PATH_MAX );
  708.  
  709.           Returns undef    on failure.
  710.  
  711.       pause      This is similar to the C function pause().
  712.  
  713.           Returns undef    on failure.
  714.  
  715.       perror  This is identical to the C function perror().
  716.  
  717.       pipe      Create an interprocess channel.  This    returns    file
  718.           descriptors like those returned by POSIX::open.
  719.  
  720.  
  721.  
  722.  
  723.      Page 11                        (printed 10/23/98)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  731.  
  732.  
  733.  
  734.               ($fd0, $fd1) = POSIX::pipe();
  735.               POSIX::write(    $fd0, "hello", 5 );
  736.               POSIX::read( $fd1, $buf, 5 );
  737.  
  738.  
  739.       pow      Computes $x raised to    the power $exponent.
  740.  
  741.               $ret = POSIX::pow( $x, $exponent );
  742.  
  743.  
  744.       printf  Prints the specified arguments to STDOUT.
  745.  
  746.       putc      _p_u_t_c() is C-specific--use print instead.
  747.  
  748.       putchar _p_u_t_c_h_a_r() is C-specific--use print instead.
  749.  
  750.       puts      _p_u_t_s() is C-specific--use print instead.
  751.  
  752.       qsort      _q_s_o_r_t() is C-specific, use sort instead.
  753.  
  754.       raise      Sends    the specified signal to    the current process.
  755.  
  756.       rand      _r_a_n_d() is non-portable, use Perl's rand instead.
  757.  
  758.       read      Read from a file.  This uses file descriptors    such
  759.           as those obtained by calling POSIX::open.  If    the
  760.           buffer $buf is not large enough for the read then
  761.           Perl will extend it to make room for the request.
  762.  
  763.               $fd =    POSIX::open( "foo", &POSIX::O_RDONLY );
  764.               $bytes = POSIX::read(    $fd, $buf, 3 );
  765.  
  766.           Returns undef    on failure.
  767.  
  768.       readdir This is identical to Perl's builtin readdir()
  769.           function.
  770.  
  771.       realloc _r_e_a_l_l_o_c() is C-specific.
  772.  
  773.       remove  This is identical to Perl's builtin unlink()
  774.           function.
  775.  
  776.       rename  This is identical to Perl's builtin rename()
  777.           function.
  778.  
  779.       rewind  Seeks    to the beginning of the    file.
  780.  
  781.       rewinddir
  782.           This is identical to Perl's builtin rewinddir()
  783.           function.
  784.  
  785.  
  786.  
  787.  
  788.  
  789.      Page 12                        (printed 10/23/98)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  797.  
  798.  
  799.  
  800.       rmdir      This is identical to Perl's builtin rmdir()
  801.           function.
  802.  
  803.       scanf      _s_c_a_n_f() is C-specific--use <>    and regular
  804.           expressions instead.
  805.  
  806.       setgid  Sets the real    group id for this process.
  807.  
  808.       setjmp  _s_e_t_j_m_p() is C-specific: use eval {} instead.
  809.  
  810.       setlocale
  811.           Modifies and queries program's locale.
  812.  
  813.           The following    will set the traditional UNIX system
  814.           locale behavior (the second argument "C").
  815.  
  816.               $loc = POSIX::setlocale( &POSIX::LC_ALL, "C" );
  817.  
  818.           The following    will query (the    missing    second
  819.           argument) the    current    LC_CTYPE category.
  820.  
  821.               $loc = POSIX::setlocale( &POSIX::LC_CTYPE);
  822.  
  823.           The following    will set the LC_CTYPE behaviour
  824.           according to the locale environment variables    (the
  825.           second argument "").    Please see your    systems    the
  826.           _s_e_t_l_o_c_a_l_e(_3) manpage documentation for the locale
  827.           environment variables' meaning or consult the
  828.           _p_e_r_l_l_o_c_a_l_e manpage.
  829.  
  830.               $loc = POSIX::setlocale( &POSIX::LC_CTYPE, "");
  831.  
  832.           The following    will set the LC_COLLATE    behaviour to
  833.           Argentinian Spanish. NNNNOOOOTTTTEEEE: The naming    and
  834.           availability of locales depends on your operating
  835.           system. Please consult the _p_e_r_l_l_o_c_a_l_e    manpage    for
  836.           how to find out which    locales    are available in your
  837.           system.
  838.  
  839.               $loc = POSIX::setlocale( &POSIX::LC_ALL, "es_AR.ISO8859-1" );
  840.  
  841.  
  842.       setpgid This is similar to the C function setpgid().
  843.  
  844.           Returns undef    on failure.
  845.  
  846.       setsid  This is identical to the C function setsid().
  847.  
  848.       setuid  Sets the real    user id    for this process.
  849.  
  850.       sigaction
  851.           Detailed signal management.  This uses
  852.  
  853.  
  854.  
  855.      Page 13                        (printed 10/23/98)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  863.  
  864.  
  865.  
  866.           POSIX::SigAction objects for the action and
  867.           oldaction arguments.    Consult    your system's
  868.           sigaction manpage for    details.
  869.  
  870.           Synopsis:
  871.  
  872.               sigaction(sig, action, oldaction = 0)
  873.  
  874.           Returns undef    on failure.
  875.  
  876.       siglongjmp
  877.           _s_i_g_l_o_n_g_j_m_p() is C-specific: use die instead.
  878.  
  879.       sigpending
  880.           Examine signals that are blocked and pending.     This
  881.           uses POSIX::SigSet objects for the sigset argument.
  882.           Consult your system's    sigpending manpage for
  883.           details.
  884.  
  885.           Synopsis:
  886.  
  887.               sigpending(sigset)
  888.  
  889.           Returns undef    on failure.
  890.  
  891.       sigprocmask
  892.           Change and/or    examine    calling    process's signal mask.
  893.           This uses POSIX::SigSet objects for the sigset and
  894.           oldsigset arguments.    Consult    your system's
  895.           sigprocmask manpage for details.
  896.  
  897.           Synopsis:
  898.  
  899.               sigprocmask(how, sigset, oldsigset = 0)
  900.  
  901.           Returns undef    on failure.
  902.  
  903.       sigsetjmp
  904.           _s_i_g_s_e_t_j_m_p() is C-specific: use eval {} instead.
  905.  
  906.       sigsuspend
  907.           Install a signal mask    and suspend process until
  908.           signal arrives.  This    uses POSIX::SigSet objects for
  909.           the signal_mask argument.  Consult your system's
  910.           sigsuspend manpage for details.
  911.  
  912.           Synopsis:
  913.  
  914.               sigsuspend(signal_mask)
  915.  
  916.           Returns undef    on failure.
  917.  
  918.  
  919.  
  920.  
  921.      Page 14                        (printed 10/23/98)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  929.  
  930.  
  931.  
  932.       sin      This is identical to Perl's builtin sin() function.
  933.  
  934.       sinh      This is identical to the C function sinh().
  935.  
  936.       sleep      This is identical to Perl's builtin sleep()
  937.           function.
  938.  
  939.       sprintf This is identical to Perl's builtin sprintf()
  940.           function.
  941.  
  942.       sqrt      This is identical to Perl's builtin sqrt() function.
  943.  
  944.       srand      _s_r_a_n_d().
  945.  
  946.       sscanf  _s_s_c_a_n_f() is C-specific--use regular expressions
  947.           instead.
  948.  
  949.       stat      This is identical to Perl's builtin stat() function.
  950.  
  951.       strcat  _s_t_r_c_a_t() is C-specific, use .= instead.
  952.  
  953.       strchr  _s_t_r_c_h_r() is C-specific, use _i_n_d_e_x() instead.
  954.  
  955.       strcmp  _s_t_r_c_m_p() is C-specific, use eq instead.
  956.  
  957.       strcoll This is identical to the C function strcoll().
  958.  
  959.       strcpy  _s_t_r_c_p_y() is C-specific, use =    instead.
  960.  
  961.       strcspn _s_t_r_c_s_p_n() is C-specific, use regular expressions
  962.           instead.
  963.  
  964.       strerror
  965.           Returns the error string for the specified errno.
  966.  
  967.       strftime
  968.           Convert date and time    information to string.
  969.           Returns the string.
  970.  
  971.           Synopsis:
  972.  
  973.               strftime(fmt,    sec, min, hour,    mday, mon, year, wday =    0, yday    = 0, isdst = 0)
  974.  
  975.           The month (mon), weekday (wday), and yearday (yday)
  976.           begin    at zero.  I.e. January is 0, not 1; Sunday is
  977.           0, not 1; January 1st    is 0, not 1.  The year (year)
  978.           is given in years since 1900.     I.e. The year 1995 is
  979.           95; the year 2001 is 101.  Consult your system's
  980.           strftime() manpage for details about these and the
  981.           other    arguments.
  982.  
  983.           The string for Tuesday, December 12, 1995.
  984.  
  985.  
  986.  
  987.      Page 15                        (printed 10/23/98)
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  995.  
  996.  
  997.  
  998.               $str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12,    11, 95,    2 );
  999.               print    "$str\n";
  1000.  
  1001.  
  1002.       strlen  _s_t_r_l_e_n() is C-specific, use length instead.
  1003.  
  1004.       strncat _s_t_r_n_c_a_t() is C-specific, use .= instead.
  1005.  
  1006.       strncmp _s_t_r_n_c_m_p() is C-specific, use eq instead.
  1007.  
  1008.       strncpy _s_t_r_n_c_p_y() is C-specific, use = instead.
  1009.  
  1010.       stroul  _s_t_r_o_u_l() is C-specific.
  1011.  
  1012.       strpbrk _s_t_r_p_b_r_k() is C-specific.
  1013.  
  1014.       strrchr _s_t_r_r_c_h_r() is C-specific, use _r_i_n_d_e_x()    instead.
  1015.  
  1016.       strspn  _s_t_r_s_p_n() is C-specific.
  1017.  
  1018.       strstr  This is identical to Perl's builtin index()
  1019.           function.
  1020.  
  1021.       strtod  String to double translation.    Returns    the parsed
  1022.           number and the number    of characters in the unparsed
  1023.           portion of the string.  Truly    POSIX-compliant
  1024.           systems set $! ($ERRNO) to indicate a    translation
  1025.           error, so clear $! before calling strtod.  However,
  1026.           non-POSIX systems may    not check for overflow,    and
  1027.           therefore will never set $!.
  1028.  
  1029.           strtod should    respect    any POSIX _s_e_t_l_o_c_a_l_e()
  1030.           settings.
  1031.  
  1032.           To parse a string $str as a floating point number
  1033.           use
  1034.  
  1035.               $! = 0;
  1036.               ($num, $n_unparsed) = POSIX::strtod($str);
  1037.  
  1038.           The second returned item and $! can be used to check
  1039.           for valid input:
  1040.  
  1041.               if (($str    eq '') || ($n_unparsed != 0) ||    !$!) {
  1042.               die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
  1043.               }
  1044.  
  1045.           When called in a scalar context strtod returns the
  1046.           parsed number.
  1047.  
  1048.       strtok  _s_t_r_t_o_k() is C-specific.
  1049.  
  1050.  
  1051.  
  1052.  
  1053.      Page 16                        (printed 10/23/98)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1061.  
  1062.  
  1063.  
  1064.       strtol  String to (long) integer translation.     Returns the
  1065.           parsed number    and the    number of characters in    the
  1066.           unparsed portion of the string.  Truly
  1067.           POSIX-compliant systems set $! ($ERRNO) to indicate
  1068.           a translation    error, so clear    $! before calling
  1069.           strtol.  However, non-POSIX systems may not check
  1070.           for overflow,    and therefore will never set $!.
  1071.  
  1072.           strtol should    respect    any POSIX _s_e_t_l_o_c_a_l_e()
  1073.           settings.
  1074.  
  1075.           To parse a string $str as a number in    some base
  1076.           $base    use
  1077.  
  1078.               $! = 0;
  1079.               ($num, $n_unparsed) = POSIX::strtol($str,    $base);
  1080.  
  1081.           The base should be zero or between 2 and 36,
  1082.           inclusive.  When the base is zero or omitted strtol
  1083.           will use the string itself to    determine the base: a
  1084.           leading "0x" or "0X" means hexadecimal; a leading
  1085.           "0" means octal; any other leading characters    mean
  1086.           decimal.  Thus, "1234" is parsed as a    decimal
  1087.           number, "01234" as an    octal number, and "0x1234" as
  1088.           a hexadecimal    number.
  1089.  
  1090.           The second returned item and $! can be used to check
  1091.           for valid input:
  1092.  
  1093.               if (($str    eq '') || ($n_unparsed != 0) ||    !$!) {
  1094.               die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
  1095.               }
  1096.  
  1097.           When called in a scalar context strtol returns the
  1098.           parsed number.
  1099.  
  1100.       strtoul String to unsigned (long) integer translation.
  1101.           strtoul is identical to strtol except    that strtoul
  1102.           only parses unsigned integers.  See _s_t_r_t_o_l for
  1103.           details.
  1104.  
  1105.           Note:    Some vendors supply strtod and strtol but not
  1106.           strtoul.  Other vendors that do suply    strtoul    parse
  1107.           "-1" as a valid value.
  1108.  
  1109.       strxfrm String transformation.  Returns the transformed
  1110.           string.
  1111.  
  1112.               $dst = POSIX::strxfrm( $src );
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.      Page 17                        (printed 10/23/98)
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1127.  
  1128.  
  1129.  
  1130.       sysconf Retrieves values of system configurable variables.
  1131.  
  1132.           The following    will get the machine's clock speed.
  1133.  
  1134.               $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
  1135.  
  1136.           Returns undef    on failure.
  1137.  
  1138.       system  This is identical to Perl's builtin system()
  1139.           function.
  1140.  
  1141.       tan      This is identical to the C function tan().
  1142.  
  1143.       tanh      This is identical to the C function tanh().
  1144.  
  1145.       tcdrain This is similar to the C function tcdrain().
  1146.  
  1147.           Returns undef    on failure.
  1148.  
  1149.       tcflow  This is similar to the C function tcflow().
  1150.  
  1151.           Returns undef    on failure.
  1152.  
  1153.       tcflush This is similar to the C function tcflush().
  1154.  
  1155.           Returns undef    on failure.
  1156.  
  1157.       tcgetpgrp
  1158.           This is identical to the C function tcgetpgrp().
  1159.  
  1160.       tcsendbreak
  1161.           This is similar to the C function tcsendbreak().
  1162.  
  1163.           Returns undef    on failure.
  1164.  
  1165.       tcsetpgrp
  1166.           This is similar to the C function tcsetpgrp().
  1167.  
  1168.           Returns undef    on failure.
  1169.  
  1170.       time      This is identical to Perl's builtin time() function.
  1171.  
  1172.       times      The _t_i_m_e_s() function returns elapsed realtime    since
  1173.           some point in    the past (such as system startup),
  1174.           user and system times    for this process, and user and
  1175.           system times used by child processes.     All times are
  1176.           returned in clock ticks.
  1177.  
  1178.               ($realtime, $user, $system, $cuser, $csystem) = POSIX::times();
  1179.  
  1180.           Note:    Perl's builtin times() function    returns    four
  1181.           values, measured in seconds.
  1182.  
  1183.  
  1184.  
  1185.      Page 18                        (printed 10/23/98)
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1193.  
  1194.  
  1195.  
  1196.       tmpfile Use method IO::File::new_tmpfile() instead.
  1197.  
  1198.       tmpnam  Returns a name for a temporary file.
  1199.  
  1200.               $tmpfile = POSIX::tmpnam();
  1201.  
  1202.  
  1203.       tolower This is identical to Perl's builtin lc() function.
  1204.  
  1205.       toupper This is identical to Perl's builtin uc() function.
  1206.  
  1207.       ttyname This is identical to the C function ttyname().
  1208.  
  1209.       tzname  Retrieves the    time conversion    information from the
  1210.           tzname variable.
  1211.  
  1212.               POSIX::tzset();
  1213.               ($std, $dst) = POSIX::tzname();
  1214.  
  1215.  
  1216.       tzset      This is identical to the C function tzset().
  1217.  
  1218.       umask      This is identical to Perl's builtin umask()
  1219.           function.
  1220.  
  1221.       uname      Get name of current operating    system.
  1222.  
  1223.               ($sysname, $nodename,    $release, $version, $machine ) = POSIX::uname();
  1224.  
  1225.  
  1226.       ungetc  Use method IO::Handle::ungetc() instead.
  1227.  
  1228.       unlink  This is identical to Perl's builtin unlink()
  1229.           function.
  1230.  
  1231.       utime      This is identical to Perl's builtin utime()
  1232.           function.
  1233.  
  1234.       vfprintf
  1235.           _v_f_p_r_i_n_t_f() is    C-specific.
  1236.  
  1237.       vprintf _v_p_r_i_n_t_f() is C-specific.
  1238.  
  1239.       vsprintf
  1240.           _v_s_p_r_i_n_t_f() is    C-specific.
  1241.  
  1242.       wait      This is identical to Perl's builtin wait() function.
  1243.  
  1244.       waitpid Wait for a child process to change state.  This is
  1245.           identical to Perl's builtin waitpid()    function.
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.      Page 19                        (printed 10/23/98)
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1259.  
  1260.  
  1261.  
  1262.               $pid = POSIX::waitpid( -1, &POSIX::WNOHANG );
  1263.               print    "status    = ", ($? / 256), "\n";
  1264.  
  1265.  
  1266.       wcstombs
  1267.           This is identical to the C function wcstombs().
  1268.  
  1269.       wctomb  This is identical to the C function wctomb().
  1270.  
  1271.       write      Write    to a file.  This uses file descriptors such as
  1272.           those    obtained by calling POSIX::open.
  1273.  
  1274.               $fd =    POSIX::open( "foo", &POSIX::O_WRONLY );
  1275.               $buf = "hello";
  1276.               $bytes = POSIX::write( $b, $buf, 5 );
  1277.  
  1278.           Returns undef    on failure.
  1279.  
  1280.      CCCCLLLLAAAASSSSSSSSEEEESSSS
  1281.       PPPPOOOOSSSSIIIIXXXX::::::::SSSSiiiiggggAAAAccccttttiiiioooonnnn
  1282.  
  1283.       new      Creates a new    POSIX::SigAction object    which
  1284.           corresponds to the C struct sigaction.  This object
  1285.           will be destroyed automatically when it is no    longer
  1286.           needed.  The first parameter is the fully-qualified
  1287.           name of a sub    which is a signal-handler.  The    second
  1288.           parameter is a POSIX::SigSet object, it defaults to
  1289.           the empty set.  The third parameter contains the
  1290.           sa_flags, it defaults    to 0.
  1291.  
  1292.               $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
  1293.               $sigaction = POSIX::SigAction->new( 'main::handler', $sigset,    &POSIX::SA_NOCLDSTOP );
  1294.  
  1295.           This POSIX::SigAction    object should be used with the
  1296.           POSIX::sigaction() function.
  1297.  
  1298.       PPPPOOOOSSSSIIIIXXXX::::::::SSSSiiiiggggSSSSeeeetttt
  1299.  
  1300.       new      Create a new SigSet object.  This object will    be
  1301.           destroyed automatically when it is no    longer needed.
  1302.           Arguments may    be supplied to initialize the set.
  1303.  
  1304.           Create an empty set.
  1305.  
  1306.               $sigset = POSIX::SigSet->new;
  1307.  
  1308.           Create a set with SIGUSR1.
  1309.  
  1310.               $sigset = POSIX::SigSet->new(    &POSIX::SIGUSR1    );
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.      Page 20                        (printed 10/23/98)
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1325.  
  1326.  
  1327.  
  1328.       addset  Add a    signal to a SigSet object.
  1329.  
  1330.               $sigset->addset( &POSIX::SIGUSR2 );
  1331.  
  1332.           Returns undef    on failure.
  1333.  
  1334.       delset  Remove a signal from the SigSet object.
  1335.  
  1336.               $sigset->delset( &POSIX::SIGUSR2 );
  1337.  
  1338.           Returns undef    on failure.
  1339.  
  1340.       emptyset
  1341.           Initialize the SigSet    object to be empty.
  1342.  
  1343.               $sigset->emptyset();
  1344.  
  1345.           Returns undef    on failure.
  1346.  
  1347.       fillset Initialize the SigSet    object to include all signals.
  1348.  
  1349.               $sigset->fillset();
  1350.  
  1351.           Returns undef    on failure.
  1352.  
  1353.       ismember
  1354.           Tests    the SigSet object to see if it contains    a
  1355.           specific signal.
  1356.  
  1357.               if( $sigset->ismember( &POSIX::SIGUSR1 ) ){
  1358.                   print    "contains SIGUSR1\n";
  1359.               }
  1360.  
  1361.  
  1362.       PPPPOOOOSSSSIIIIXXXX::::::::TTTTeeeerrrrmmmmiiiioooossss
  1363.  
  1364.       new      Create a new Termios object.    This object will be
  1365.           destroyed automatically when it is no    longer needed.
  1366.           A Termios object corresponds to the termios C
  1367.           struct.  _n_e_w() mallocs a new one, _g_e_t_a_t_t_r() fills it
  1368.           from a file descriptor, and _s_e_t_a_t_t_r()    sets a file
  1369.           descriptor's parameters to match Termios' contents.
  1370.  
  1371.               $termios = POSIX::Termios->new;
  1372.  
  1373.  
  1374.       getattr Get terminal control attributes.
  1375.  
  1376.           Obtain the attributes    for stdin.
  1377.  
  1378.               $termios->getattr()
  1379.  
  1380.  
  1381.  
  1382.  
  1383.      Page 21                        (printed 10/23/98)
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1391.  
  1392.  
  1393.  
  1394.           Obtain the attributes    for stdout.
  1395.  
  1396.               $termios->getattr( 1 )
  1397.  
  1398.           Returns undef    on failure.
  1399.  
  1400.       getcc      Retrieve a value from    the c_cc field of a termios
  1401.           object.  The c_cc field is an    array so an index must
  1402.           be specified.
  1403.  
  1404.               $c_cc[1] = $termios->getcc(1);
  1405.  
  1406.  
  1407.       getcflag
  1408.           Retrieve the c_cflag field of    a termios object.
  1409.  
  1410.               $c_cflag = $termios->getcflag;
  1411.  
  1412.  
  1413.       getiflag
  1414.           Retrieve the c_iflag field of    a termios object.
  1415.  
  1416.               $c_iflag = $termios->getiflag;
  1417.  
  1418.  
  1419.       getispeed
  1420.           Retrieve the input baud rate.
  1421.  
  1422.               $ispeed = $termios->getispeed;
  1423.  
  1424.  
  1425.       getlflag
  1426.           Retrieve the c_lflag field of    a termios object.
  1427.  
  1428.               $c_lflag = $termios->getlflag;
  1429.  
  1430.  
  1431.       getoflag
  1432.           Retrieve the c_oflag field of    a termios object.
  1433.  
  1434.               $c_oflag = $termios->getoflag;
  1435.  
  1436.  
  1437.       getospeed
  1438.           Retrieve the output baud rate.
  1439.  
  1440.               $ospeed = $termios->getospeed;
  1441.  
  1442.  
  1443.       setattr Set terminal control attributes.
  1444.  
  1445.           Set attributes immediately for stdout.
  1446.  
  1447.  
  1448.  
  1449.      Page 22                        (printed 10/23/98)
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1457.  
  1458.  
  1459.  
  1460.               $termios->setattr( 1,    &POSIX::TCSANOW    );
  1461.  
  1462.           Returns undef    on failure.
  1463.  
  1464.       setcc      Set a    value in the c_cc field    of a termios object.
  1465.           The c_cc field is an array so    an index must be
  1466.           specified.
  1467.  
  1468.               $termios->setcc( &POSIX::VEOF, 1 );
  1469.  
  1470.  
  1471.       setcflag
  1472.           Set the c_cflag field    of a termios object.
  1473.  
  1474.               $termios->setcflag( $c_cflag | &POSIX::CLOCAL    );
  1475.  
  1476.  
  1477.       setiflag
  1478.           Set the c_iflag field    of a termios object.
  1479.  
  1480.               $termios->setiflag( $c_iflag | &POSIX::BRKINT    );
  1481.  
  1482.  
  1483.       setispeed
  1484.           Set the input    baud rate.
  1485.  
  1486.               $termios->setispeed( &POSIX::B9600 );
  1487.  
  1488.           Returns undef    on failure.
  1489.  
  1490.       setlflag
  1491.           Set the c_lflag field    of a termios object.
  1492.  
  1493.               $termios->setlflag( $c_lflag | &POSIX::ECHO );
  1494.  
  1495.  
  1496.       setoflag
  1497.           Set the c_oflag field    of a termios object.
  1498.  
  1499.               $termios->setoflag( $c_oflag | &POSIX::OPOST );
  1500.  
  1501.  
  1502.       setospeed
  1503.           Set the output baud rate.
  1504.  
  1505.               $termios->setospeed( &POSIX::B9600 );
  1506.  
  1507.           Returns undef    on failure.
  1508.  
  1509.       Baud rate values
  1510.           B38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200
  1511.           B9600    B600 B4800 B50 B2400 B110
  1512.  
  1513.  
  1514.  
  1515.      Page 23                        (printed 10/23/98)
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1523.  
  1524.  
  1525.  
  1526.       Terminal interface values
  1527.           TCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION
  1528.           TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
  1529.  
  1530.       c_cc field values
  1531.           VEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART
  1532.           VSTOP    VMIN VTIME NCCS
  1533.  
  1534.       c_cflag field    values
  1535.           CLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL
  1536.           PARENB PARODD
  1537.  
  1538.       c_iflag field    values
  1539.           BRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP
  1540.           IXOFF    IXON PARMRK
  1541.  
  1542.       c_lflag field    values
  1543.           ECHO ECHOE ECHOK ECHONL ICANON IEXTEN    ISIG NOFLSH
  1544.           TOSTOP
  1545.  
  1546.       c_oflag field    values
  1547.           OPOST
  1548.  
  1549.      PPPPAAAATTTTHHHHNNNNAAAAMMMMEEEE CCCCOOOONNNNSSSSTTTTAAAANNNNTTTTSSSS
  1550.       Constants
  1551.           _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON
  1552.           _PC_MAX_INPUT    _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX
  1553.           _PC_PIPE_BUF _PC_VDISABLE
  1554.  
  1555.      PPPPOOOOSSSSIIIIXXXX CCCCOOOONNNNSSSSTTTTAAAANNNNTTTTSSSS
  1556.       Constants
  1557.           _POSIX_ARG_MAX _POSIX_CHILD_MAX
  1558.           _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL
  1559.           _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT
  1560.           _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC
  1561.           _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF
  1562.           _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX
  1563.           _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION
  1564.  
  1565.      SSSSYYYYSSSSTTTTEEEEMMMM CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
  1566.       Constants
  1567.           _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK
  1568.           _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX
  1569.           _SC_SAVED_IDS    _SC_STREAM_MAX _SC_TZNAME_MAX
  1570.           _SC_VERSION
  1571.  
  1572.      EEEERRRRRRRRNNNNOOOO
  1573.       Constants
  1574.           E2BIG    EACCES EADDRINUSE EADDRNOTAVAIL    EAFNOSUPPORT
  1575.           EAGAIN EALREADY EBADF    EBUSY ECHILD ECONNABORTED
  1576.           ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM
  1577.           EDQUOT EEXIST    EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
  1578.  
  1579.  
  1580.  
  1581.      Page 24                        (printed 10/23/98)
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1589.  
  1590.  
  1591.  
  1592.           EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP
  1593.           EMFILE EMLINK    EMSGSIZE ENAMETOOLONG ENETDOWN
  1594.           ENETRESET ENETUNREACH    ENFILE ENOBUFS ENODEV ENOENT
  1595.           ENOEXEC ENOLCK ENOMEM    ENOPROTOOPT ENOSPC ENOSYS
  1596.           ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY
  1597.           ENXIO    EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE EPROCLIM
  1598.           EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART
  1599.           EROFS    ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE
  1600.           ETIMEDOUT ETOOMANYREFS ETXTBSY EUSERS    EWOULDBLOCK
  1601.           EXDEV
  1602.  
  1603.      FFFFCCCCNNNNTTTTLLLL
  1604.       Constants
  1605.           FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_OK
  1606.           F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK
  1607.           F_WRLCK O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY
  1608.           O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY
  1609.  
  1610.      FFFFLLLLOOOOAAAATTTT
  1611.       Constants
  1612.           DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX
  1613.           DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP
  1614.           DBL_MIN_EXP FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX
  1615.           FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP
  1616.           FLT_MIN_EXP FLT_RADIX    FLT_ROUNDS LDBL_DIG
  1617.           LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX LDBL_MAX_10_EXP
  1618.           LDBL_MAX_EXP LDBL_MIN    LDBL_MIN _10_EXP LDBL_MIN_EXP
  1619.  
  1620.      LLLLIIIIMMMMIIIITTTTSSSS
  1621.       Constants
  1622.           ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX INT_MAX
  1623.           INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON
  1624.           MAX_INPUT MB_LEN_MAX NAME_MAX    NGROUPS_MAX OPEN_MAX
  1625.           PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN    SHRT_MAX
  1626.           SHRT_MIN SSIZE_MAX STREAM_MAX    TZNAME_MAX UCHAR_MAX
  1627.           UINT_MAX ULONG_MAX USHRT_MAX
  1628.  
  1629.      LLLLOOOOCCCCAAAALLLLEEEE
  1630.       Constants
  1631.           LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC
  1632.           LC_TIME
  1633.  
  1634.      MMMMAAAATTTTHHHH
  1635.       Constants
  1636.           HUGE_VAL
  1637.  
  1638.      SSSSIIIIGGGGNNNNAAAALLLL
  1639.       Constants
  1640.           SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK
  1641.           SA_RESETHAND SA_RESTART SA_SIGINFO SIGABRT SIGALRM
  1642.           SIGCHLD SIGCONT SIGFPE SIGHUP    SIGILL SIGINT SIGKILL
  1643.           SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP
  1644.  
  1645.  
  1646.  
  1647.      Page 25                        (printed 10/23/98)
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1655.  
  1656.  
  1657.  
  1658.           SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL
  1659.           SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
  1660.  
  1661.      SSSSTTTTAAAATTTT
  1662.       Constants
  1663.           S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
  1664.           S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP
  1665.           S_IXOTH S_IXUSR
  1666.  
  1667.       Macros  S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
  1668.  
  1669.      SSSSTTTTDDDDLLLLIIIIBBBB
  1670.       Constants
  1671.           EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
  1672.  
  1673.      SSSSTTTTDDDDIIIIOOOO
  1674.       Constants
  1675.           BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid
  1676.           L_tmpname TMP_MAX
  1677.  
  1678.      TTTTIIIIMMMMEEEE
  1679.       Constants
  1680.           CLK_TCK CLOCKS_PER_SEC
  1681.  
  1682.      UUUUNNNNIIIISSSSTTTTDDDD
  1683.       Constants
  1684.           R_OK SEEK_CUR    SEEK_END SEEK_SET STDIN_FILENO
  1685.           STDOUT_FILENO    STRERR_FILENO W_OK X_OK
  1686.  
  1687.      WWWWAAAAIIIITTTT
  1688.       Constants
  1689.           WNOHANG WUNTRACED
  1690.  
  1691.       Macros  WIFEXITED WEXITSTATUS    WIFSIGNALED WTERMSIG
  1692.           WIFSTOPPED WSTOPSIG
  1693.  
  1694.      CCCCRRRREEEEAAAATTTTIIIIOOOONNNN
  1695.       This document    generated by ./mkposixman.PL version 19960129.
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.      Page 26                        (printed 10/23/98)
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.      PPPPOOOOSSSSIIIIXXXX((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))          PPPPOOOOSSSSIIIIXXXX((((3333))))
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.      Page 27                        (printed 10/23/98)
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.